package com.infoland.afanmall.model.story.entity;

import com.chad.library.adapter.base.entity.MultiItemEntity;

import java.util.List;

/**
 * @author 王永吉
 * @date 2018/8/13 12:50
 */
public class StoryInfoAdapterEntity implements MultiItemEntity {
    @Override
    public int getItemType() {
        if ("text".equals(type)) {
            return 0;
        } else if ("image".equals(type)) {
            return 1;
        } else if ("images".equals(type)) {
            return 2;
        } else if ("video".equals(type)) {
            return 3;
        } else {
            return 9;
        }
    }

    /**
     * text : 您了解残疾人的世界吗？
     * 生活对他们来说真的很难，
     * 无法找一个正常的工作，
     * 无法长时间下地劳作。
     * type : text
     * image : {"fileName":"111.jpg","url":"http://file.avanti.aft100.com/group1/M00/00/15/wKgBNltQYbaAPChzAAEXTCDbq88540.jpg"}
     * images : [{"fileName":"test1.jpg","url":"http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiARj0SAADJ4c1tFxY293.jpg"},{"fileName":"test2.jpg","url":"http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiAdB7gAAC-MeN9FFU458.jpg"},{"fileName":"test3.jpg","url":"http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiAeJGyAACuqUrhJUM703.jpg"},{"fileName":"test4.jpg","url":"http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiAf23GAAECdBhNv2Q264.jpg"}]
     * video : {"iFileName":"village.jpg","vFileName":"Video.mp4","i_url":"http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDr-AFvVIAAE65Nlbh-4730.jpg","v_url":"http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiAecAEABgBs4t6Qt8244.mp4"}
     */

    private String text;
    private String type;
    private StoryInfoEntity.ObjectBean.SContextBean.ImageBean image;
    private StoryInfoEntity.ObjectBean.SContextBean.VideoBean video;
    private List<StoryInfoEntity.ObjectBean.SContextBean.ImagesBean> images;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public StoryInfoEntity.ObjectBean.SContextBean.ImageBean getImage() {
        return image;
    }

    public void setImage(StoryInfoEntity.ObjectBean.SContextBean.ImageBean image) {
        this.image = image;
    }

    public StoryInfoEntity.ObjectBean.SContextBean.VideoBean getVideo() {
        return video;
    }

    public void setVideo(StoryInfoEntity.ObjectBean.SContextBean.VideoBean video) {
        this.video = video;
    }

    public List<StoryInfoEntity.ObjectBean.SContextBean.ImagesBean> getImages() {
        return images;
    }

    public void setImages(List<StoryInfoEntity.ObjectBean.SContextBean.ImagesBean> images) {
        this.images = images;
    }

    public static class ImageBean {
        /**
         * fileName : 111.jpg
         * url : http://file.avanti.aft100.com/group1/M00/00/15/wKgBNltQYbaAPChzAAEXTCDbq88540.jpg
         */

        private String fileName;
        private String url;

        public String getFileName() {
            return fileName;
        }

        public void setFileName(String fileName) {
            this.fileName = fileName;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }

    public static class VideoBean {
        /**
         * iFileName : village.jpg
         * vFileName : Video.mp4
         * i_url : http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDr-AFvVIAAE65Nlbh-4730.jpg
         * v_url : http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiAecAEABgBs4t6Qt8244.mp4
         */

        private String iFileName;
        private String vFileName;
        private String i_url;
        private String v_url;

        public String getIFileName() {
            return iFileName;
        }

        public void setIFileName(String iFileName) {
            this.iFileName = iFileName;
        }

        public String getVFileName() {
            return vFileName;
        }

        public void setVFileName(String vFileName) {
            this.vFileName = vFileName;
        }

        public String getI_url() {
            return i_url;
        }

        public void setI_url(String i_url) {
            this.i_url = i_url;
        }

        public String getV_url() {
            return v_url;
        }

        public void setV_url(String v_url) {
            this.v_url = v_url;
        }
    }

    public static class ImagesBean {
        /**
         * fileName : test1.jpg
         * url : http://file.dwys.aft100.com/group1/M00/00/34/rBG7OFtxDqiARj0SAADJ4c1tFxY293.jpg
         */

        private String fileName;
        private String url;

        public String getFileName() {
            return fileName;
        }

        public void setFileName(String fileName) {
            this.fileName = fileName;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }
    }
}


